import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import KxTaskProcessBarChart from "./index";

const meta = {
  title: "柱状图/可信逾期任务柱状图KxTaskProcessBarChart",
  component: KxTaskProcessBarChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div
        style={{ backgroundColor: "#031857", height: "468px", width: "472px" }}
      >
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof KxTaskProcessBarChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    dataSource: [
      {
        name: "马銮湾保障房地铁社区二期A01~03地块",
        planAmount: 12,
        amount: 2,
      },
      { name: "马銮湾保障房地铁社区二期A04~07地块", planAmount: 12, amount: 3 },
      { name: "保障性住房龙泉公寓一期", planAmount: 12, amount: 7 },
      { name: "洪茂居住区一期", planAmount: 12, amount: 0 },
      { name: "东园保障性住房", planAmount: 12, amount: 0 },
    ],
  },
};

export const typeOfWork: Story = {
  args: {
    needPlan: false,
    needReal: true,
    height: "316px",
    dataSource: [
      { name: "开挖", amount: 30 },
      { name: "施工", amount: 60 },
      { name: "攀载车", amount: 32 },
      { name: "支护", amount: 86 },
      { name: "钻工", amount: 50 },
      { name: "喷浆", amount: 32 },
      { name: "小工", amount: 105 },
      { name: "加工", amount: 25 },
      { name: "测量", amount: 60 },
      { name: "钢筋工", amount: 45 },
    ],
  },
};
